#ifndef SUDOKUMAINWINDOW_H
#define SUDOKUMAINWINDOW_H

#include <QMainWindow>
#include "SudokuData.h"
#include "SudokuDataModel.h"
#include "SudokuSolver.h"

class QCheckBox;
class QLineEdit;

namespace Ui {
    class SudokuMainWindow;
}

class SudokuMainWindow : public QMainWindow {
    Q_OBJECT
public:
    SudokuMainWindow(QWidget *parent = 0);
    ~SudokuMainWindow();

public slots:
    void solveDiagram();
    void loadFromFile();
    void saveToFile();
    void clearDiagram();
    void paste();
    void print();

    void updateView(const QModelIndex& topLeft, const QModelIndex& bottomRight);

    void updateMask(bool Add);

protected:
    void changeEvent(QEvent *e);
    //void keyPressEvent (QKeyEvent* event);

    void closeEvent(QCloseEvent* event);

    void readSettings();
    void saveSettings();
    bool reallyExit();

private:
    Ui::SudokuMainWindow* ui;

    SudokuDataModel* mModel;

    SudokuSolver mSolver;

    CellFillerTypes mSolveMask;

    QList<QLineEdit*> mLineEditList;
};

#endif // SUDOKUMAINWINDOW_H
